package com.hdd.utils;

public class IndexPair {
    private int fromIdx;
    private int toIdx;

    private IndexPair(int fromIdx) {

        this.fromIdx = fromIdx;
    }

    public static IndexPair create(int fromIdx) {
        return new IndexPair(fromIdx);
    }

    public int getFromIdx() {
        return fromIdx;
    }

    public void setFromIdx(int fromIdx) {
        this.fromIdx = fromIdx;
    }

    public int getToIdx() {
        return toIdx;
    }

    public void setToIdx(int toIdx) {
        this.toIdx = toIdx;
    }

    public IndexPair addToIdx(int toIdx) {
        setToIdx(toIdx);
        return this;
    }
}